// Date: 2021/4/18
// Time: 15:23
// File Name: echartRouter.js
// ProjectName: vue-admin
// Description: echartRouter.js
// echart  接口


const express = require('express')
const echartRouter = express.Router()
const {incallDataEch,types,outcallDataEch} = require('../handle')

// 查询收入echarts数据
echartRouter.post('/incall',(req,res)=>{
    incallDataEch(req.body.id).then((result)=>{
        res.send(result)
    })
})

// 查询支出echarts数据
echartRouter.post('/outcall',(req,res)=>{
    outcallDataEch(req.body.id).then((result)=>{
        res.send(result)
    })

})


echartRouter.get('/types',(req,res)=>{
    types().then((result)=>{
        res.send(result)
    })

})



module.exports = echartRouter